![]() |
Welcome to HTML Links |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
[What are Links?]
[Basic Link]
[Image Link]
What are Links?Links are what connect the web together. Without them, you would have to tell the person to type in a certain URL in the location bar or put everything on single page. There are 2 types of links: ones that go to an URL or one that goes to an email address.
![]() The Basic LinkAs you know there are 2 types of links; ones that go to an URL or ones that sends an email. The tag that they use is the <a> tag. The format for a URL is: <a href="http://www.yoursite.com/">Link Name</a>
<a href="mailto:username@provider.com">Email Name</a>
An Image LinkThe image link is very commom and is, in my opinion, a lot better than the one above. It activates the image the same as it does text, so you do is place the image tag inbetween the <a> and </a> tags. Remember that it is best to match images with the links.
<a href="http://www.yoursite.com/">
<a href="mailto:username@provider.com">
Removing/Enlarging the Link BorderOne thing that is very annoying is the link border. You finally get a transparent background and then the border ruins it. Of course, some people like the border and like it thicker. The normal thickness of the border is "2".
<a href="http://www.yoursite.com/">
<a href="http://www.yoursite.com/">
<a href="http://www.yoursite.com/">
<a href="http://www.yoursite.com/">
Opening Links in New WindowsOpening links in new windows is great. When you have a "Links Page", you can let people visit the other sites, without leaving yours. There are 2 ways to do it and both work just fine.
<a href="http://www.yoursite.com/" target="_blank">New Window 1</a> <a href="http://www.yoursite.com/" target="_new">New Window 2</a>
Links and FramesThis is a very important section for people who use frames. Without out these, you'll have some major problems. First is opening a link out of frames. This breaks the link out of your frames. <a href="http://www.yoursite.com/" target="_top">Link out of Frames</a>
<a href="http://www.yoursite.com/" target="framename">Link from one frame to another</a> Link from one frame to another
Base HREF LinkingBase HREF linking can save you a lot of time because you don't have to type in the whole address every time. Though if you use "Linking parts of the Same Page" you have to type in the partial address too. So this is a mixed blessing. Remember to place inbetween the <head> and </head>. <head> <base href="http://www.yoursite.com/"> </head>
Linking parts of the Same PageNotice at the top and bottom of this page have links that bring to different parts of the page? I love this effect. To get it, there are 2 steps. Step 1 is the name the part you want the link to go to. Without the link will be useless. <a name="samplename">Sample Name</a>
<a href="#sample">Sample Name</a>
<a href="/html/links/#sample">Sample Name</a>
Link Tags and AttributesThe following are the link tags and their attributes: <a> </a> This tag is what makes all links. There are many more attributes than I listed but you probably won't use the others.
This one anchors all links to another so you do not have to write it all every time. Place it in the <head> and </head> tags.
[What are Links?]
[Basic Link]
[Image Link]
|